/* 
 * File:   World2D.h
 * Author: aljosa
 *
 * Created on May 25, 2010, 8:54 PM
 */

#ifndef _WORLD2D_H
#define	_WORLD2D_H

#include "World.h"
#include <Box2D/Box2D.h>

#define BOX2D_SCALE 1.0f

#define WORLD_TO_SCREEN(a) (a*BOX2D_SCALE)
#define SCREEN_TO_WORLD(a) (a/BOX2D_SCALE)

namespace xEngine
{
    namespace CoreSystem
    {
        class World2D : public World {
        public:
            World2D();
            virtual ~World2D();

            // World creation and destruction
            virtual bool create(float gravityX, float gravityY, float width, float height);
            virtual void shutDown();

            // SceneGraph manipulation
          /*  virtual void addChild(Node *node);
            virtual void addSibling(Node *node);*/

            // Draw - update - animate triple
            virtual void draw(double deltaTime);
            virtual void update(double deltaTime);
            virtual void animate(double deltaTime);
            
       // protected:
            b2World *worldBox2D;
            b2AABB box;


        };
    }
}

#endif	/* _WORLD2D_H */

